<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1">
    <title>Document</title>
    <style>
        body {
            width: 200px;
        }
        .parent {
            width:100%;
            height: 0;
            padding-top:56.25%;

            background-color: pink;
            position: relative;
        }
        .child {
            width:100%;
            height:100%;
            background-color: black;
            position: absolute;
        }
    </style>
</head>
<body>
<div class="parent" id="parent" style="position: relative"> this is parent
    <div class="child"> this is child</div>
</div>
</body>
</html>